#include "configinfo.h"
#include "remotedef.h"
#include <QVariant>

ConfigInfo::ConfigInfo()
    :BaseResp()
{
    key = "";
    value = "";
    comment = "";
    type = "";
    init = "";
    range = "";
}

void ConfigInfo::unserialize(QString json)
{
    BaseResp::unserialize(json);
    if (m_json.isValid())
    {
        key = m_json.value(KEY_CONFIG_KEY).toString();
        value = m_json.value(KEY_CONFIG_VALUE).toString();
        comment = m_json.value(KEY_CONFIG_COMMENT).toString();
        type = m_json.value(KEY_CONFIG_TYPE).toString();
        init = m_json.value(KEY_CONFIG_INIT).toString();
        range = m_json.value(KEY_CONFIG_RANGE).toString();
    }
}

QString ConfigInfo::getKey() const
{
    return key;
}

void ConfigInfo::setKey(const QString &value)
{
    key = value;
}
QString ConfigInfo::getValue() const
{
    return value;
}

void ConfigInfo::setValue(const QString &value)
{
    this->value = value;
}
QString ConfigInfo::getComment() const
{
    return comment;
}

void ConfigInfo::setComment(const QString &value)
{
    comment = value;
}
QString ConfigInfo::getType() const
{
    return type;
}

void ConfigInfo::setType(const QString &value)
{
    type = value;
}
QString ConfigInfo::getInit() const
{
    return init;
}

void ConfigInfo::setInit(const QString &value)
{
    init = value;
}
QString ConfigInfo::getRange() const
{
    return range;
}

void ConfigInfo::setRange(const QString &value)
{
    range = value;
}






